Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library/dao/playlistdao: Increase robustness by using prepared statements #2900

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

Holzhaus
Copy link
Member

No description provided.

@Holzhaus Holzhaus added this to the 2.4.0 milestone Jun 23, 2020
@Holzhaus Holzhaus requested a review from uklotzde June 23, 2020 16:28
@uklotzde
Copy link
Contributor

uklotzde commented Jun 23, 2020

Fixes #10025

Thanks for jumping in, Jan!

return;
}

query.prepare(QStringLiteral(
Copy link
Contributor

@uklotzde uklotzde Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MUCH (25 ms vs. 1000 ms) faster: Oh, but that doesn't cover orphaned tracks. Ignore it!

SELECT PlaylistTracks.position FROM PlaylistTracks
INNER JOIN library ON library.id=PlaylistTracks.track_id
AND library.mixxx_deleted=0
AND PlaylistTracks.playlist_id=:id

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Works as is. No need to change it.

@uklotzde
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants